package api

import request "gitee.com/changeden/volcengine-livesaas-request-go"

type ListUserBehaviorDataRequest struct {
	PageNo        *int32  `json:"PageNo"`
	PageItemCount *int32  `json:"PageItemCount"`
	ActivityId    *int64  `json:"ActivityId"`
	Name          *string `json:"Name"`
	StartTime     *int64  `json:"StartTime"`
	EndTime       *int64  `json:"EndTime"`
	IsMerge       *int32  `json:"IsMerge"`
	Sort          *string `json:"Sort"`
	Order         *string `json:"Order"`
	NeedAll       *bool   `json:"NeedAll"`
	Soucre        *int32  `json:"Soucre"`
	PlayStatus    *int32  `json:"PlayStatus"`
}
type ListUserBehaviorData struct {
	Department string  `json:"Department" gorm:"column:Department"`
	LeaveAt    []int64 `json:"leaveAt" gorm:"column:leaveAt"`
	UserName   string  `json:"UserName" gorm:"column:UserName"`
	UserTel    string  `json:"UserTel" gorm:"column:UserTel"`
	InviteCode string  `json:"InviteCode" gorm:"column:InviteCode"`
	UserID     int64   `json:"UserId" gorm:"column:UserId"`
	IP         string  `json:"IP" gorm:"column:IP"`
	Region     string  `json:"Region" gorm:"column:Region"`
	JoinAt     []int64 `json:"JoinAt" gorm:"column:JoinAt"`
	WatchTime  int64   `json:"WatchTime" gorm:"column:WatchTime"`
}
type ListUserBehaviorDataResponse struct {
	TotalItemCount int64                  `json:"TotalItemCount"`
	Data           []ListUserBehaviorData `json:"Data"`
}

func (instance *Instance) ListUserBehaviorData(data *ListUserBehaviorDataRequest) (*ListUserBehaviorDataResponse, error) {
	d := request.Data{
		Action: "ListUserBehaviorDataAPI",
	}
	bindQuery(&d, *data)
	var res ListUserBehaviorDataResponse
	err := instance.get(&d, &res)
	return &res, err
}
